package com.zch.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zch.dao.ProjectConnectMapper;
import com.zch.dao.model.ProjectConnect;
import com.zch.dao.model.ProjectConnectExample;
import com.zch.daoEx.ProjectConnectMapperEx;
import com.zch.daoEx.model.ProjectConnectEx;

@Service
public class ProjectConnectService {
	@Autowired
	private ProjectConnectMapper projectConnectMapper;
	@Autowired
    private ProjectConnectMapperEx projectConnectMapperEx;

	public int countByExample(ProjectConnectExample example) {
		return this.projectConnectMapper.countByExample(example);
	}

	public ProjectConnect selectByPrimaryKey(String id) {
		return this.projectConnectMapper.selectByPrimaryKey(id);
	}

	public List<ProjectConnect> selectByExample(ProjectConnectExample example) {
		return this.projectConnectMapper.selectByExample(example);
	}

	public int deleteByPrimaryKey(String id) {
		return this.projectConnectMapper.deleteByPrimaryKey(id);
	}

	public int updateByPrimaryKeySelective(ProjectConnect record) {
		return this.projectConnectMapper.updateByPrimaryKeySelective(record);
	}

	public int updateByPrimaryKey(ProjectConnect record) {
		return this.projectConnectMapper.updateByPrimaryKey(record);
	}

	public int deleteByExample(ProjectConnectExample example) {
		return this.projectConnectMapper.deleteByExample(example);
	}

	public int updateByExampleSelective(ProjectConnect record, ProjectConnectExample example) {
		return this.projectConnectMapper.updateByExampleSelective(record, example);
	}

	public int updateByExample(ProjectConnect record, ProjectConnectExample example) {
		return this.projectConnectMapper.updateByExample(record, example);
	}

	public int insert(ProjectConnect record) {
		return this.projectConnectMapper.insert(record);
	}

	public int insertSelective(ProjectConnect record) {
		return this.projectConnectMapper.insertSelective(record);
	}

    public List<ProjectConnectEx> selectList(Map<String, Object> map) {
        return this.projectConnectMapperEx.selectList(map);
    }
    
    public int updateConnectManager(String userId, String id) {
        this.projectConnectMapperEx.updateConnectMaster(userId,id);
        return this.projectConnectMapperEx.updateConnectMasterByProjectMessage(userId,id);
    }

    public List<ProjectConnectEx> selectAppDetailByInside(Map<String, Object> map) {
        return this.projectConnectMapperEx.selectAppDetailByInside(map);
    }

    public Boolean updateIsFinish(Map<String, Object> map) {
        return this.projectConnectMapperEx.updateIsFinish(map);
    }

}
